<template>
	<view class="content">
		<!-- 加载页 -->
		<loadPageVue></loadPageVue>
		<!-- 顶部导航 -->
		<navbarVue :opacity="opacity"></navbarVue>
		<!-- 轮播图 -->
		<swiperVue></swiperVue>
		<!-- 分类 -->
		<classVue></classVue>
		<!-- 精选 -->
		<premiumProductsVue></premiumProductsVue>
		<uv-gap height="30rpx" bgColor="#00000000"></uv-gap>
		<!-- 玉石文化 -->
		<cultureVue></cultureVue>
		<!--悬浮客服按钮 -->
		<liu-drag-button style="z-index: 50;">
			<image src="../../static/icon/icon-kf.png" mode="" style="width: 100%;height: 100%;"></image>
		</liu-drag-button>


		<!-- 底部导航栏 -->
		<tabbarVue :currentIndex="0"></tabbarVue>
	</view>
</template>

<script>
	import swiperVue from './components/swiper.vue';
	import classVue from './components/class.vue';
	import premiumProductsVue from './components/premiumProducts.vue';
	import cultureVue from './components/culture.vue';
	import tabbarVue from '../../components/tabbar/tabbar.vue';
	import navbarVue from './components/navbar.vue';
	import loadPageVue from '../../components/loadPage/loadPage.vue';

	export default {
		components: {
			swiperVue,
			classVue,
			premiumProductsVue,
			cultureVue,
			tabbarVue,
			navbarVue,
			loadPageVue
		},
		data() {
			return {
				widthRpx: 0,
				opacity: 0,
			}
		},
		onPageScroll(e) {
			this.opacity = (e.scrollTop * this.widthRpx) / 715
		},

		async onLoad() {
			let systemInfo = await uni.getSystemInfoSync()
			this.widthRpx = 750 / systemInfo.windowWidth
		
		},
		methods: {
			hadne() {
				console.log();
			},

		}
	}
</script>

<style lang="scss" scoped>
	
</style>